package com.clementheliou.cheliou.util.builder;

/**
 * Abstract builder that can be extended for test purpose only. It contains common parts of builders
 * used to get instances of <tt>T</tt>.
 * 
 * @author Clément HELIOU (clement.heliou@gmail.com)
 * @since 1.0
 */
public abstract class ObjectBuilder<T> {

	/**
	 * The <tt>T</tt> object to be built by the builder instance.
	 */
	private T instance;

	/**
	 * Gets the built <tt>T</tt> instance.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @return the built <tt>T</tt> instance.
	 * @since 1.0
	 */
	public T getObject() {
		return this.instance;
	}

	/*
	 * Getters & setters.
	 */

	protected void setInstance(T instance) {
		this.instance = instance;
	}

}
